require "nvchad.mappings"

-- add yours here
package.path = package.path .. ";/Users/laiweilai/.luarocks.share/lua/5.1/?/init.lua;"
-- package.path = package.path .. ";~//lua/5.1/?/init.lua;"

local map = vim.keymap.set

map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")

-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
map("n", "<leader>kal1", ":echo kalpa1<cr>", { desc = "kalpa test1" })
map("n", "<leader>kal2", ":echot kalpa2<cr>", { desc = "klapa test2" })
map("n", "<leader>kal3", ":echot kalpa2<cr>", { desc = "klapa test3" })


-- 使用<alt-num> 来选择tab
for i = 1, 9, 1 do
  vim.keymap.set("n", string.format("<A-%s>", i), function()
    vim.api.nvim_set_current_buf(vim.t.bufs[i])
  end)
end

-- 关闭所有选项卡
map("n", "<leader>tca", require("nvchad.tabufline").closeAllBufs, {desc = "close all buffer"})

